package com.c.yinyuezhushou.MyTool;


import org.apache.commons.lang3.StringUtils;

public class DateChange {
    public static long getmillisecond(String s){
        Integer f = Integer.valueOf(StringUtils.left(s,2));
        Integer hm = Integer.valueOf(StringUtils.substringsBetween(s,".","]")[0]);
        Integer m = Integer.valueOf(StringUtils.substring(s,3,5));
        return f*60*1000+m*1000+hm;
    }

    public static String getDate(long hm){
        int s = (int) (hm/1000);
        String f = String.valueOf(s/60);
        String m = String.valueOf(s%60);
        String hm1 = String.valueOf(s%1000);
        return f+":"+m+"."+hm1;
    }
    public static String getDate1(long hm){
        int s = (int) (hm/1000);
        String f = String.valueOf(s/60);
        String m = String.valueOf(s%60);
        return f+":"+m;
    }
}
